#ifndef CONVERSATIONWIDGET_H
#define CONVERSATIONWIDGET_H

#include <QWidget>
#include "RoQuery.h"

#include "ui_ConversationWidgetUI.h"

namespace Conversation
{
    enum DialogTypes
    {
        Standard = 0,
        Info
    };
}

class ConversationWidget : public QWidget, Ui::ConversationWidgetUI
{
    Q_OBJECT

    typedef QWidget super;
public:

    explicit ConversationWidget(QTabWidget *parent = 0, int type = Conversation::Standard, QString name = QString());
    ~ConversationWidget();
    void addLogText(QString text = QString());
    void setButtonsState(bool state);
    void setLogText(QString text = QString());
signals:
public slots:
    void addInfo();
    void closeProperly();
    void logInfoText(const RoInfoStanza& stanza);
    void handleErrorRadioButtonStateChange(bool isChecked);
    void receive_query_datum(QDomDocument datum);
    void receive_query_result(bool error, QDomDocument answer);
private:
    QTabWidget* parentTabWidget;
    RoQuery* dialogQuery;

    QString _name;
};

#endif // CONVERSATIONWIDGET_H
